import Vue from 'vue';
import App from './App.vue';

// 1. 下载
// 2. 引入
// 3. Vue注册
// 4. 创建路由器实例
// 5. 注入到根实例上

import VueRouter from 'vue-router';

import Find from './views/Find.vue';
import My from './views/My.vue';
import Friend from './views/Friend.vue';

Vue.use(VueRouter);

const router = new VueRouter({
  routes: [
    { path: '/find', component: Find },
    { path: '/my', component: My },
    { path: '/friend', component: Friend },
  ],
});

Vue.config.productionTip = false;

new Vue({
  render: h => h(App),
  router,
}).$mount('#app');
